package com.ymttest.database.mapping.godmember;

import com.ymttest.database.model.godmember.Member;
import com.ymttest.database.model.godmember.MemberExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface MemberMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table member
     *
     * @mbggenerated Wed Jun 17 14:52:25 CST 2020
     */
    @SelectProvider(type=MemberSqlProvider.class, method="countByExample")
    int countByExample(MemberExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table member
     *
     * @mbggenerated Wed Jun 17 14:52:25 CST 2020
     */
    @DeleteProvider(type=MemberSqlProvider.class, method="deleteByExample")
    int deleteByExample(MemberExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table member
     *
     * @mbggenerated Wed Jun 17 14:52:25 CST 2020
     */
    @Delete({
        "delete from member",
        "where MemberId = #{memberId,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String memberId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table member
     *
     * @mbggenerated Wed Jun 17 14:52:25 CST 2020
     */
    @Insert({
        "insert into member (MemberId, ShopId, ",
        "OpenId, UserId, ",
        "Mobile, CsId, AccessSource, ",
        "NickName, RealName, ",
        "WechatName, Sex, ",
        "AccessTime, RegisterTime, ",
        "Remark, CreateTime, ",
        "UpdateTime, DsId)",
        "values (#{memberId,jdbcType=VARCHAR}, #{shopId,jdbcType=INTEGER}, ",
        "#{openId,jdbcType=VARCHAR}, #{userId,jdbcType=INTEGER}, ",
        "#{mobile,jdbcType=VARCHAR}, #{csId,jdbcType=INTEGER}, #{accessSource,jdbcType=INTEGER}, ",
        "#{nickName,jdbcType=VARCHAR}, #{realName,jdbcType=VARCHAR}, ",
        "#{wechatName,jdbcType=VARCHAR}, #{sex,jdbcType=VARCHAR}, ",
        "#{accessTime,jdbcType=TIMESTAMP}, #{registerTime,jdbcType=TIMESTAMP}, ",
        "#{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ",
        "#{updateTime,jdbcType=TIMESTAMP}, #{dsId,jdbcType=INTEGER})"
    })
    int insert(Member record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table member
     *
     * @mbggenerated Wed Jun 17 14:52:25 CST 2020
     */
    @InsertProvider(type=MemberSqlProvider.class, method="insertSelective")
    int insertSelective(Member record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table member
     *
     * @mbggenerated Wed Jun 17 14:52:25 CST 2020
     */
    @SelectProvider(type=MemberSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="MemberId", property="memberId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="ShopId", property="shopId", jdbcType=JdbcType.INTEGER),
        @Result(column="OpenId", property="openId", jdbcType=JdbcType.VARCHAR),
        @Result(column="UserId", property="userId", jdbcType=JdbcType.INTEGER),
        @Result(column="Mobile", property="mobile", jdbcType=JdbcType.VARCHAR),
        @Result(column="CsId", property="csId", jdbcType=JdbcType.INTEGER),
        @Result(column="AccessSource", property="accessSource", jdbcType=JdbcType.INTEGER),
        @Result(column="NickName", property="nickName", jdbcType=JdbcType.VARCHAR),
        @Result(column="RealName", property="realName", jdbcType=JdbcType.VARCHAR),
        @Result(column="WechatName", property="wechatName", jdbcType=JdbcType.VARCHAR),
        @Result(column="Sex", property="sex", jdbcType=JdbcType.VARCHAR),
        @Result(column="AccessTime", property="accessTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="RegisterTime", property="registerTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="Remark", property="remark", jdbcType=JdbcType.VARCHAR),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="DsId", property="dsId", jdbcType=JdbcType.INTEGER)
    })
    List<Member> selectByExample(MemberExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table member
     *
     * @mbggenerated Wed Jun 17 14:52:25 CST 2020
     */
    @Select({
        "select",
        "MemberId, ShopId, OpenId, UserId, Mobile, CsId, AccessSource, NickName, RealName, ",
        "WechatName, Sex, AccessTime, RegisterTime, Remark, CreateTime, UpdateTime, DsId",
        "from member",
        "where MemberId = #{memberId,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="MemberId", property="memberId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="ShopId", property="shopId", jdbcType=JdbcType.INTEGER),
        @Result(column="OpenId", property="openId", jdbcType=JdbcType.VARCHAR),
        @Result(column="UserId", property="userId", jdbcType=JdbcType.INTEGER),
        @Result(column="Mobile", property="mobile", jdbcType=JdbcType.VARCHAR),
        @Result(column="CsId", property="csId", jdbcType=JdbcType.INTEGER),
        @Result(column="AccessSource", property="accessSource", jdbcType=JdbcType.INTEGER),
        @Result(column="NickName", property="nickName", jdbcType=JdbcType.VARCHAR),
        @Result(column="RealName", property="realName", jdbcType=JdbcType.VARCHAR),
        @Result(column="WechatName", property="wechatName", jdbcType=JdbcType.VARCHAR),
        @Result(column="Sex", property="sex", jdbcType=JdbcType.VARCHAR),
        @Result(column="AccessTime", property="accessTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="RegisterTime", property="registerTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="Remark", property="remark", jdbcType=JdbcType.VARCHAR),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="DsId", property="dsId", jdbcType=JdbcType.INTEGER)
    })
    Member selectByPrimaryKey(String memberId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table member
     *
     * @mbggenerated Wed Jun 17 14:52:25 CST 2020
     */
    @UpdateProvider(type=MemberSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") Member record, @Param("example") MemberExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table member
     *
     * @mbggenerated Wed Jun 17 14:52:25 CST 2020
     */
    @UpdateProvider(type=MemberSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") Member record, @Param("example") MemberExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table member
     *
     * @mbggenerated Wed Jun 17 14:52:25 CST 2020
     */
    @UpdateProvider(type=MemberSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(Member record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table member
     *
     * @mbggenerated Wed Jun 17 14:52:25 CST 2020
     */
    @Update({
        "update member",
        "set ShopId = #{shopId,jdbcType=INTEGER},",
          "OpenId = #{openId,jdbcType=VARCHAR},",
          "UserId = #{userId,jdbcType=INTEGER},",
          "Mobile = #{mobile,jdbcType=VARCHAR},",
          "CsId = #{csId,jdbcType=INTEGER},",
          "AccessSource = #{accessSource,jdbcType=INTEGER},",
          "NickName = #{nickName,jdbcType=VARCHAR},",
          "RealName = #{realName,jdbcType=VARCHAR},",
          "WechatName = #{wechatName,jdbcType=VARCHAR},",
          "Sex = #{sex,jdbcType=VARCHAR},",
          "AccessTime = #{accessTime,jdbcType=TIMESTAMP},",
          "RegisterTime = #{registerTime,jdbcType=TIMESTAMP},",
          "Remark = #{remark,jdbcType=VARCHAR},",
          "CreateTime = #{createTime,jdbcType=TIMESTAMP},",
          "UpdateTime = #{updateTime,jdbcType=TIMESTAMP},",
          "DsId = #{dsId,jdbcType=INTEGER}",
        "where MemberId = #{memberId,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(Member record);
}